
Partial Class Contact
    Inherits BasePage

    Protected Sub btnSend_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSend.Click
        Try
            Dim msg As New System.Net.Mail.MailMessage
            msg.From = New System.Net.Mail.MailAddress(txtFrom.Text)
            msg.To.Add(New System.Net.Mail.MailAddress(Globals.Settings.ContactForm.MailTo))
            msg.CC.Add(New System.Net.Mail.MailAddress(Globals.Settings.ContactForm.MailCC))
            msg.Subject = txtSubject.Text
            msg.Body = txtBody.Text
            Dim smtp As New System.Net.Mail.SmtpClient
            smtp.Send(msg)

            lblFeedbackOK.Visible = True
            lblFeedbackKO.Visible = False
            txtFrom.Text = ""
            txtSubject.Text = ""
            txtBody.Text = ""

        Catch ex As Exception

            lblFeedbackOK.Visible = False
            lblFeedbackKO.Visible = True

        End Try
    End Sub

End Class
